package com.xaicode.auth.config.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;
import org.springframework.stereotype.Component;

/**
 * 项目内自定义配置
 * 
 * @date 2024/12/6
 */
@Data
@Component
@ConfigurationProperties(prefix = "system")
public class SystemProperties {

    /**
     * 是否保存操作日志到数据库
     */
    private boolean saveLog = true;

    @NestedConfigurationProperty
    private AuthProperties auth = new AuthProperties();

    @NestedConfigurationProperty
    private RsaProperties rsa = new RsaProperties();

    @NestedConfigurationProperty
    private XssProperties xss = new XssProperties();

    @NestedConfigurationProperty
    private ThreadProperties thread = new ThreadProperties();

    @NestedConfigurationProperty
    private SecurityProperties security = new SecurityProperties();

}
